<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="../public/css/index.css">
		<link rel="stylesheet" href="../public/css/editinfo.css">
	</head>
	<body>
		<header style="display:flex">
			<div class="title">
				<a href="http://localhost:3000/getuser/userlist">慧光健康</a>
			</div>
			<div class="loginmsg">
				<div class="username">
					<span>用户:</span>
					<span>
						<%=glousername%>
					</span>
				</div>
				<a href="/getuser/login" class="exit">退出</a>
				<a href="" class="amplification"><img src="../public/img/全屏.png" alt=""></a>
			</div>
		</header>
		<div id="content">
			<div class="sidebar">
				<ul class="modellist">
					<li><span class="icon i1"></span><a href="#">机构管理</a></li>
					<li><span class="icon"></span><a href="http://localhost:3000/getuser/hospitalmanagement">医院管理</a></li>
					<li><span class="icon i2"></span><a href="#">人员管理</a></li>
					<li><span class="icon"></span><a href="#">用户管理</a></li>
					<li><span class="icon"></span><a href="#">家人管理</a></li>
					<li><span class="icon"></span><a href="#">登录账号</a></li>
					<li><span class="icon i3"></span><a href="#">内容管理</a></li>
					<li><span class="icon"></span><a href="#">资讯管理</a></li>
					<li><span class="icon"></span><a href="#">广告管理</a></li>
					<li><span class="icon"></span><a href="#">页面管理</a></li>
					<li><span class="icon i4"></span><a href="#">消息管理</a></li>
					<li><span class="icon i5"></span><a href="#">版本升级</a></li>
					<li><span class="icon i6"></span><a href="#">用户反馈</a></li>
				</ul>
			</div>
			<div class="information">
				<div class="head">
					<div class="path">
						<span>首页</span><span>&gt;</span>
						<span>信息管理</span><span>&gt;</span>
						<span>医院管理</span>
					</div>
					<a href="" class="return">
						返回
					</a>
				</div>
				<div class="addinfo">
					<form action="" method="post">
						<p>
							<span>*分类:</span><select name="class">
								<option value="1">新兴卫生</option>
								<option value="2">慧光</option>
							</select>
						</p>
						<p><span>*标题:</span><input class="infotitle" type="text" name="infotitle" value="新兴卫生医疗系统完善"></p>
						<div class="img">
							<span>*缩略图:</span>
							<label for="file">+
							  <img class="small_img" src="" alt="" height="100" width="100">
							<div class="del">
								删除
							</div>
							</label>
							<input type="file" id="file">
							<p class="dif">为了保证展示效果,建议图片尺寸100*84px</p>
						</div>
						<p>
							<span>资讯地址:</span>
							<input type="url" class="url" placeholder="请输入打开的页面地址" name="url">
						</p>
						<p><span>内容:</span>
							<textarea name="infocontent" id="" cols="30" rows="10"></textarea>
						</p>
						<p>
							<span>*是否显示</span>
							<select name="show">
								<option value="0">显示</option>
								<option value="1">不显示</option>
							</select>
						</p>
						<p><button type="submit">保存</button></p>
					</form>
				</div>
			</div>
		</div>
		<script src="../public/js/jquery-3.6.0.min.js"></script>
		<script type="text/javascript">
			let pic = $('#file');
			let delpic = $('.del');
			pic.change(function(){
				let file = new FileReader();
				file.readAsDataURL(this.files[0]);
				file.onload = function(){
					$('.small_img')[0].src = file.result;
				}
			})
			delpic.click(function(e){
				e.preventDefault();				
				$('.small_img')[0].src = '';
			})
		</script>
	</body>
</html>